<template>
  <div>
    <el-tabs v-model="comName" type="card" @tab-click="handleClick">
      <el-tab-pane label="机器人管理" name="RobotManage"></el-tab-pane>
      <el-tab-pane label="消息设置" name="MessageManage"></el-tab-pane>
    </el-tabs>
    <component :is="comName"></component>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
import RobotManage from "./RobotManage.vue";
import MessageManage from "./MessageManage.vue";

@Component({
  components: {
    RobotManage,
    MessageManage,
  },
})
export default class RobotIndex extends Vue {
  /** 当前显示组件 */
  comName = "RobotManage";

  /** 切换标签显示组件 */
  handleClick(tab) {
    this.comName = tab.name;
  }
}
</script>

<style lang="scss" scoped></style>
